package cn.stylefeng.guns.modular.gridsystem.mapper;

import cn.stylefeng.guns.modular.gridsystem.entity.BizDevice;
import cn.stylefeng.guns.modular.gridsystem.model.param.BizGatewayParam;
import cn.stylefeng.guns.modular.gridsystem.model.result.BizGatewayResult;
import cn.stylefeng.guns.modular.gridsystem.model.result.DeviceStatusNumberResult;
import cn.stylefeng.guns.modular.gridsystem.mqtt.result.GatewayChannelStatus;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.stylefeng.guns.modular.gridsystem.entity.BizGateway;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tencentcloudapi.iot.v20180123.models.DeviceStatus;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 采集设备 Mapper 接口
 *
 * @author ssy
 * @date 2021/09/14 11:47
 */
public interface BizGatewayMapper extends BaseMapper<BizGateway> {

    List<BizGateway> offDutyList(@Param("date") String date);

    List<BizGatewayResult> getListAndChannel(@Param("ew") LambdaQueryWrapper<BizGateway> ew);

    BizGatewayParam getById(@Param("id") Integer id);

    Page<BizGatewayResult> pageResult(Page page, @Param("param") BizGatewayParam param);

    Page<BizGatewayResult> guidePageResult(Page page, @Param("param") BizGatewayParam param);

    List<GatewayChannelStatus> getGatewayChannelStatus();

    DeviceStatusNumberResult getDeviceOnlineNumber(@Param("ew") LambdaQueryWrapper<BizDevice> ew);


}
